const { Sequelize, sequelize } = require('../init');

const xm = sequelize.define('xm', {
    zt: {
        type: Sequelize.INTEGER,
        validate: {
            notEmpty: true
        }
    },
    bjdj: {
        type: Sequelize.STRING,
        validate: {
            notEmpty: true
        }
    },
    bjsj:{
        type: Sequelize.STRING,
        validate: {
            notEmpty: true
        }
    },
    jcsj:{
        type: Sequelize.STRING,
        validate: {
            notEmpty: true
        }
    },
    dd:{
        type: Sequelize.STRING,
        validate: {
            notEmpty: true
        }
    },
    sb:{
        type: Sequelize.STRING,
        validate: {
            notEmpty: true
        }
    },
    jkx:{
        type: Sequelize.STRING,
        validate: {
            notEmpty: true
        }
    },
    sj:{
        type: Sequelize.STRING,
        validate: {
            notEmpty: true
        }
    },
    bjfz:{
        type: Sequelize.STRING,
        validate: {
            notEmpty: true
        }
    },
    bjz:{
        type: Sequelize.STRING,
        validate: {
            notEmpty: true
        }
    },
}, {
    modelName: 'xm', // 我们需要选择模型名称
    freezeTableName: true
})
   
xm.sync().then(() => {
    console.log('表模型同步')
});

module.exports = xm;